<!--
  This file is a part of the open-eBackup project.
  This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
  If a copy of the MPL was not distributed with this file, You can obtain one at
  http://mozilla.org/MPL/2.0/.
  
  Copyright (c) [2024] Huawei Technologies Co.,Ltd.
  
  THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
  EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
  MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
  -->

<div class="tips" *ngIf="specialResource && action === protectResourceAction.Modify">
    <i style="display: inline-block; margin-right: 4px;" lv-icon="lv-icon-status-info" lvColorState='true'
        class="type-icon"></i>
    <span style="display: inline-block; width: 96%;">
        {{ specialResourceTips }}
    </span>
</div>
<aui-backup-policy [formGroup]="formGroup" [data]="backupData" [applicationType]="applicationData"
                   [isWormData]="isWormData" [activeIndex]="activeIndex" [isSpecialSense]="specialResource" [action]="action" [isBasicDisk]="isBasicDisk">
</aui-backup-policy>
<ng-contianer
    *ngIf="!_includes([applicationType.GBase, applicationType.Vmware, applicationType.Common, applicationType.LocalFileSystem, applicationType.LocalLun], applicationData)">
    <div class="dashed-line aui-gutter-column-lg"></div>
    <aui-advanced-parameters [appType]="applicationData" [formGroup]="formGroup" [data]="backupData" [action]="action" [isUsed]="isUsed"
                             (isDisableBasicDiskWorm)="storageTypeWormChange($event)">
    </aui-advanced-parameters>
</ng-contianer>
<ng-container [ngSwitch]="applicationData"
    *ngIf="_includes([applicationType.GBase, applicationType.Vmware, applicationType.Common,applicationType.LocalFileSystem, applicationType.LocalLun], applicationData)">
    <ng-container *ngSwitchCase="applicationType.Common">
        <aui-general-advanced-parameter [formGroup]="formGroup" [data]="backupData" [action]="action" [isUsed]="isUsed"
                                        (isDisableBasicDiskWorm)="storageTypeWormChange($event)">
        </aui-general-advanced-parameter>
    </ng-container>
    <ng-container *ngSwitchCase="applicationType.Vmware">
        <aui-vmware-advanced-parameter [formGroup]="formGroup" [data]="backupData" [action]="action" [isUsed]="isUsed"
                                       (isDisableBasicDiskWorm)="storageTypeWormChange($event)">
        </aui-vmware-advanced-parameter>
    </ng-container>
    <ng-container *ngSwitchCase="applicationType.LocalFileSystem">
        <aui-local-file-system-advanced-parameter [formGroup]="formGroup" [data]="backupData" [action]="action">
        </aui-local-file-system-advanced-parameter>
    </ng-container>
    <ng-container *ngSwitchCase="applicationType.LocalLun">
        <div class="dashed-line aui-gutter-column-lg"></div>
        <aui-local-file-system-advanced-parameter [formGroup]="formGroup" [data]="backupData" [action]="action">
        </aui-local-file-system-advanced-parameter>
    </ng-container>
</ng-container>
